home *** CD-ROM | disk | FTP | other *** search
- on setSprites default
- global gCurrDialogButtonDM
- set gCurrDialogButtonDM to default
- puppetSprite(2, 1)
- puppetSprite(3, 1)
- if the castNum of sprite 4 <> 0 then
- puppetSprite(4, 1)
- end if
- end
-
- on keyDown
- global gCurrDialogButtonDM
- if voidp(gCurrDialogButtonDM) then
- set gCurrDialogButtonDM to 2
- end if
- set lastsprite to gCurrDialogButtonDM
- if the key = TAB then
- if the castNum of sprite 4 = 0 then
- set limit to 3
- else
- set limit to 4
- end if
- if not (the shiftDown) then
- if lastsprite < limit then
- set gCurrDialogButtonDM to gCurrDialogButtonDM + 1
- else
- set gCurrDialogButtonDM to 2
- end if
- else
- if lastsprite = 2 then
- set gCurrDialogButtonDM to limit
- else
- set gCurrDialogButtonDM to gCurrDialogButtonDM - 1
- end if
- end if
- set c to the castNum of sprite lastsprite
- set the castNum of sprite lastsprite to c - 1
- set c to the castNum of sprite gCurrDialogButtonDM
- set the castNum of sprite gCurrDialogButtonDM to c + 1
- updateStage()
- else
- if (the key = RETURN) or (the key = ENTER) then
- hiliteButton(lastsprite)
- mouseDown(script the scriptNum of sprite lastsprite)
- end if
- end if
- end
-
- on dialogButtonChoice c
- global gDialogResult, gDialogCallback
- set gDialogResult to c
- if count(the windowList) > 0 then
- tell the stage
- do(gDialogCallback)
- end tell
- else
- beep()
- end if
- end
-
- on hiliteButton s
- if voidp(s) then
- if the lastClick < 20 then
- set s to the clickOn
- else
- exit
- end if
- end if
- set h to the locH of sprite s
- set v to the locV of sprite s
- set the locH of sprite s to h + 2
- set the locV of sprite s to v + 2
- updateStage()
- wait()
- set the locH of sprite s to h
- set the locV of sprite s to v
- wait()
- updateStage()
- end
-
- on dialogwidth
- return the width of sprite 1
- end
-
- on dialogHeight
- return the height of sprite 1
- end
-
- on wait t
- if voidp(t) then
- set t to 10
- end if
- startTimer()
- repeat while the timer < t
- nothing()
- end repeat
- end
-